package com.mjk.manager.amis.core.model;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.mjk.common.base.model.BaseEntity;
import com.mjk.common.core.jdbc.annotation.*;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.List;

@Data
@ArcSharding(dataSource = "", table = "plat_user", userName = "")
public class PlatUser extends BaseEntity {
    public PlatUser() {
    }

    public PlatUser(String id, String userName) {
        this.id = id;
        this.NAME = userName;
    }
//    @Id
    @ExampleField
    private String id;
    @Filed(comment = "用户名", lenght = 64, cloum = "LOGIN_NAME")
    private String LOGIN_NAME;
    @Filed(comment = "姓名", lenght = 64, cloum = "NAME")
    private String NAME;
    @Filed(comment = "手机号", lenght = 64, cloum = "TEL")
    private String TEL;
    @Filed(comment = "电子邮件", lenght = 64, cloum = "EMAIL")
    private String EMAIL;
    @Filed(comment = "密码", lenght = 64, cloum = "PASSWORD")
    private String PASSWORD;
    @Filed(comment = "密码盐", lenght = 64, cloum = "SALT")
    private String SALT;
    @Filed(comment = "头像", lenght = 256, cloum = "AVATAR")
    private String AVATAR;
    @Filed(comment = "默认系统", lenght = 64, cloum = "DEF_SYS_ID")
    private String DEF_SYS_ID;
    @Filed(comment = "默认系统名称", lenght = 64, cloum = "DEF_SYS_NAME")
    private String DEF_SYS_NAME;
    @Filed(comment = "用户状态", lenght = 10, cloum = "STATUS")
    private Integer STATUS;
    @Filed(comment = "删除标记", lenght = 1, cloum = "DELETED")
    private Boolean DELETED;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Filed(comment = "创建时间", lenght = 19, cloum = "CREATED_AT")
    private LocalDateTime CREATED_AT;
    @Filed(comment = "创建人员", lenght = 64, cloum = "CREATED_BY")
    private String CREATED_BY;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Filed(comment = "更新时间", lenght = 19, cloum = "UPDATED_AT")
    private LocalDateTime UPDATED_AT;
    @Filed(comment = "更新人员", lenght = 64, cloum = "UPDATED_BY")
    private String UPDATED_BY;
    @Filed(comment = "角色IDS", lenght = 200, cloum = "roles")
    private String roles;
    @Transient
    private String roleName;

    @Transient
    private String creater;

    @Transient
    private List<String> roleIds;
}